﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using JasLib.Extensions;
using WpfFizzBuzz.ViewModels;

namespace WpfFizzBuzz
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainViewModel ViewModel
        {
            get { return (this.DataContext as MainViewModel); }
            set { this.DataContext = value; }
        }

        public MainWindow()
        {
            InitializeComponent();

            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
            this.ViewModel = new MainViewModel();

            var factorViewModel1 = new FactorViewModel(this.ViewModel, "Fizz", 3);
            var factorViewModel2 = new FactorViewModel(this.ViewModel, "Buzz", 5);
            this.ViewModel.Factors.AddRange(factorViewModel1, factorViewModel2);
            return;
        }

        protected async void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            return;
        }
    }
}
